# Author: Richard Brown
# Copyright 2019 University College London
# Copyright (c) 2018, NiftyReg Developers.
# All rights reserved.
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0.txt
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.

# This file sets NIFTYREG_INCLUDE_DIRS, NIFTYREG_LIBRARY_DIRS and NIFTYREG_LIBRARIES.
@PACKAGE_INIT@

# add folder where this file resides to the cmake path such that it can use our find_package modules and .cmake files
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR};${CMAKE_MODULE_PATH}")

set_and_check(NIFTYREG_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include")
set_and_check(NIFTYREG_LIBRARY_DIRS "@CMAKE_INSTALL_PREFIX@/lib")
set(NIFTYREG_LIBRARIES "@NIFTYREG_LIBRARIES@")

# NIFTYREG built with various components?
# CUDA
if (@USE_CUDA@)
  set(NIFTYREG_BUILT_WITH_CUDA TRUE)
  mark_as_advanced(NIFTYREG_BUILT_WITH_CUDA)
endif()
# NII_NAN
if (@USE_NII_NAN@)
  set(NIFTYREG_BUILT_WITH_NII_NAN TRUE)
  mark_as_advanced(NIFTYREG_BUILT_WITH_NII_NAN)
endif()
# NRRD
if (@USE_NRRD@)
  set(NIFTYREG_BUILT_WITH_NRRD TRUE)
  mark_as_advanced(NIFTYREG_BUILT_WITH_NRRD)
endif()
# OPENCL
if (@USE_OPENCL@)
  set(NIFTYREG_BUILT_WITH_OPENCL TRUE)
  mark_as_advanced(NIFTYREG_BUILT_WITH_OPENCL)
endif()
# OPENMP
if (@USE_OPENMP@)
  set(NIFTYREG_BUILT_WITH_OPENMP TRUE)
  mark_as_advanced(NIFTYREG_BUILT_WITH_OPENMP)
endif()
# SSE
if (@USE_SSE@)
  set(NIFTYREG_BUILT_WITH_SSE TRUE)
  mark_as_advanced(NIFTYREG_BUILT_WITH_SSE)
endif()